/ BBS in a Box 11
/ AMUG BBS in a Box Volume XI (April 1994) (MacWizards).iso / Files / Prog / D-G / FORTRAN Goodies.sit / FORTRAN Goodies / String Utilities / string.f ![]() | < prev | next > |
MacBinary | 1990-12-05 | 1.6 KB | [TEXT/MPS ] |
Confidence | Program | Detection | Match Type | Support |
---|---|---|---|---|
66% | dexvert | Freeze Frozen Compressed File (archive/freeze) | ext | Supported |
10% | dexvert | MacBinary (archive/macBinary) | fallback | Supported |
1% | dexvert | MathVISION Formula (other/mathVISIONFormula) | ext | Unsupported |
1% | dexvert | Text File (text/txt) | fallback | Supported |
100% | file | MacBinary II, Wed Dec 5 12:04:27 1990, modified Wed Dec 5 12:04:27 1990, creator 'MPS ', type ASCII, 1063 bytes "string.f" , at 0x4a7 382 bytes resource | default (weak) | |
99% | file | data | default | |
74% | TrID | Macintosh plain text (MacBinary) | default | |
25% | TrID | MacBinary 2 | default (weak) | |
100% | siegfried | fmt/1762 MacBinary (II) | default | |
100% | lsar | MacBinary | default |
id metadata | |
---|---|
key | value |
macFileType | [TEXT] |
macFileCreator | [MPS ] |
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 08 73 74 72 69 6e 67 | 2e 66 00 00 00 00 00 00 |..string|.f......|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 00 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 04 27 00 | 00 01 7e a3 82 d9 1b a3 |......'.|..~.....|
|00000060| 82 d9 1b 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 88 f7 00 00 |........|........|
|00000080| 63 0d 63 09 54 68 69 73 | 20 65 78 61 6d 70 6c 65 |c.c.This| example|
|00000090| 20 61 63 63 65 70 74 73 | 20 65 69 74 68 65 72 20 | accepts| either |
|000000a0| 61 20 73 74 72 69 6e 67 | 20 6f 72 20 61 20 63 68 |a string| or a ch|
|000000b0| 61 72 61 63 74 65 72 20 | 61 72 67 75 6d 65 6e 74 |aracter |argument|
|000000c0| 0d 63 09 61 6e 64 20 72 | 65 74 75 72 6e 73 20 74 |.c.and r|eturns t|
|000000d0| 68 65 20 61 72 67 75 6d | 65 6e 74 20 61 73 20 61 |he argum|ent as a|
|000000e0| 20 73 74 72 69 6e 67 2e | 0d 63 0d 63 09 45 78 61 | string.|.c.c.Exa|
|000000f0| 6d 70 6c 65 20 70 72 6f | 76 69 64 65 64 20 66 6f |mple pro|vided fo|
|00000100| 72 20 6f 77 6e 65 72 73 | 20 6f 66 20 4c 61 6e 67 |r owners| of Lang|
|00000110| 75 61 67 65 20 53 79 73 | 74 65 6d 73 20 46 4f 52 |uage Sys|tems FOR|
|00000120| 54 52 41 4e 0d 63 09 a9 | ca 31 39 39 30 20 4c 61 |TRAN.c..|.1990 La|
|00000130| 6e 67 75 61 67 65 20 53 | 79 73 74 65 6d 73 20 43 |nguage S|ystems C|
|00000140| 6f 72 70 2e 0d 63 0d 63 | 09 57 72 69 74 74 65 6e |orp..c.c|.Written|
|00000150| 20 62 79 20 53 74 65 76 | 65 6e 20 48 6f 70 6b 69 | by Stev|en Hopki|
|00000160| 6e 73 0d 63 0d 09 73 74 | 72 69 6e 67 20 66 75 6e |ns.c..st|ring fun|
|00000170| 63 74 69 6f 6e 20 53 74 | 72 69 6e 67 28 53 74 72 |ction St|ring(Str|
|00000180| 5f 43 68 61 72 5f 41 72 | 67 29 0d 09 0d 09 69 6d |_Char_Ar|g)....im|
|00000190| 70 6c 69 63 69 74 20 6e | 6f 6e 65 0d 0d 43 09 09 |plicit n|one..C..|
|000001a0| 72 65 63 65 69 76 65 20 | 74 68 65 20 61 72 67 75 |receive |the argu|
|000001b0| 6d 65 6e 74 20 62 79 20 | 44 65 73 63 72 69 70 74 |ment by |Descript|
|000001c0| 6f 72 0d 0d 09 73 74 72 | 75 63 74 75 72 65 20 2f |or...str|ucture /|
|000001d0| 44 65 73 63 52 65 63 2f | 0d 09 09 70 6f 69 6e 74 |DescRec/|...point|
|000001e0| 65 72 20 2f 63 68 61 72 | 61 63 74 65 72 2a 31 2f |er /char|acter*1/|
|000001f0| 20 44 61 74 61 50 74 72 | 0d 09 09 69 6e 74 65 67 | DataPtr|...integ|
|00000200| 65 72 2a 32 20 44 61 74 | 61 53 69 7a 65 0d 09 09 |er*2 Dat|aSize...|
|00000210| 69 6e 74 65 67 65 72 2a | 32 20 53 79 6d 54 0d 09 |integer*|2 SymT..|
|00000220| 65 6e 64 20 73 74 72 75 | 63 74 75 72 65 0d 09 72 |end stru|cture..r|
|00000230| 65 63 6f 72 64 20 2f 44 | 65 73 63 52 65 63 2f 20 |ecord /D|escRec/ |
|00000240| 53 74 72 5f 43 68 61 72 | 5f 41 72 67 0d 09 0d 09 |Str_Char|_Arg....|
|00000250| 69 6e 74 65 67 65 72 2a | 32 20 63 68 61 72 64 2c |integer*|2 chard,|
|00000260| 73 74 72 6e 67 64 0d 09 | 70 61 72 61 6d 65 74 65 |strngd..|paramete|
|00000270| 72 20 28 63 68 61 72 64 | 3d 31 38 2c 73 74 72 6e |r (chard|=18,strn|
|00000280| 67 64 3d 31 39 29 0d 09 | 70 6f 69 6e 74 65 72 20 |gd=19)..|pointer |
|00000290| 2f 63 68 61 72 61 63 74 | 65 72 2a 31 2f 20 43 68 |/charact|er*1/ Ch|
|000002a0| 61 72 50 74 72 0d 09 69 | 6e 74 65 67 65 72 2a 34 |arPtr..i|nteger*4|
|000002b0| 20 73 69 7a 65 0d 0d 43 | 09 09 70 6f 69 6e 74 20 | size..C|..point |
|000002c0| 74 6f 20 74 68 65 20 63 | 68 61 72 61 63 74 65 72 |to the c|haracter|
|000002d0| 73 20 73 6f 20 77 65 20 | 63 61 6e 20 6c 6f 6f 6b |s so we |can look|
|000002e0| 0d 43 09 09 61 74 20 74 | 68 65 6d 20 77 69 74 68 |.C..at t|hem with|
|000002f0| 6f 75 74 20 63 68 61 6e | 67 69 6e 67 20 74 68 65 |out chan|ging the|
|00000300| 20 64 65 73 63 72 69 70 | 74 6f 72 0d 0d 09 43 68 | descrip|tor...Ch|
|00000310| 61 72 50 74 72 20 3d 20 | 53 74 72 5f 43 68 61 72 |arPtr = |Str_Char|
|00000320| 5f 41 72 67 2e 44 61 74 | 61 50 74 72 0d 0d 43 09 |_Arg.Dat|aPtr..C.|
|00000330| 09 64 65 63 69 64 65 20 | 69 66 20 74 68 65 20 61 |.decide |if the a|
|00000340| 72 67 75 6d 65 6e 74 20 | 69 73 20 61 20 63 68 61 |rgument |is a cha|
|00000350| 72 61 63 74 65 72 0d 43 | 09 09 6f 72 20 61 20 73 |racter.C|..or a s|
|00000360| 74 72 69 6e 67 0d 0d 09 | 69 66 20 28 53 74 72 5f |tring...|if (Str_|
|00000370| 43 68 61 72 5f 41 72 67 | 2e 53 79 6d 54 20 3d 3d |Char_Arg|.SymT ==|
|00000380| 20 73 74 72 6e 67 64 29 | 20 74 68 65 6e 0d 09 09 | strngd)| then...|
|00000390| 73 69 7a 65 20 3d 20 69 | 63 68 61 72 28 53 74 72 |size = i|char(Str|
|000003a0| 5f 43 68 61 72 5f 41 72 | 67 2e 44 61 74 61 50 74 |_Char_Ar|g.DataPt|
|000003b0| 72 5e 29 0d 09 09 43 68 | 61 72 50 74 72 20 3d 20 |r^)...Ch|arPtr = |
|000003c0| 43 68 61 72 50 74 72 20 | 2b 20 31 0d 09 65 6c 73 |CharPtr |+ 1..els|
|000003d0| 65 0d 09 09 73 69 7a 65 | 20 3d 53 74 72 5f 43 68 |e...size| =Str_Ch|
|000003e0| 61 72 5f 41 72 67 2e 44 | 61 74 61 53 69 7a 65 0d |ar_Arg.D|ataSize.|
|000003f0| 09 65 6e 64 20 69 66 0d | 0d 43 09 09 6d 61 6b 65 |.end if.|.C..make|
|00000400| 20 73 75 72 65 20 74 68 | 61 74 20 61 72 67 75 6d | sure th|at argum|
|00000410| 65 6e 74 20 77 69 6c 6c | 20 66 69 74 20 69 6e 74 |ent will| fit int|
|00000420| 6f 20 61 20 73 74 72 69 | 6e 67 0d 0d 09 73 69 7a |o a stri|ng...siz|
|00000430| 65 20 3d 20 4d 49 4e 28 | 32 35 35 2c 73 69 7a 65 |e = MIN(|255,size|
|00000440| 29 0d 0d 43 09 09 72 65 | 74 75 72 6e 20 63 68 61 |)..C..re|turn cha|
|00000450| 72 61 63 74 65 72 73 20 | 61 73 20 61 20 73 74 72 |racters |as a str|
|00000460| 69 6e 67 0d 43 09 09 28 | 74 75 72 6e 20 72 61 6e |ing.C..(|turn ran|
|00000470| 67 65 20 63 68 65 63 6b | 69 6e 67 20 6f 66 66 29 |ge check|ing off)|
|00000480| 0d 21 21 52 2d 0d 09 53 | 74 72 69 6e 67 20 3d 20 |.!!R-..S|tring = |
|00000490| 43 68 61 72 50 74 72 5e | 28 31 3a 73 69 7a 65 29 |CharPtr^|(1:size)|
|000004a0| 0d 0d 09 65 6e 64 0d 00 | 00 00 00 00 00 00 00 00 |...end..|........|
|000004b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000500| 00 00 01 00 00 00 01 4c | 00 00 00 4c 00 00 00 32 |.......L|...L...2|
|00000510| 50 72 6f 67 72 61 6d 20 | 4e 61 6d 65 3f 22 20 2d |Program |Name?" -|
|00000520| 64 20 22 7b 50 72 6f 67 | 72 61 6d 7d 22 20 7c 7c |d "{Prog|ram}" |||
|00000530| 08 73 74 72 69 6e 67 2e | 66 00 02 00 00 00 50 61 |.string.|f.....Pa|
|00000540| 72 74 53 49 54 78 00 00 | 00 00 00 00 00 00 00 01 |rtSITx..|........|
|00000550| 00 00 50 61 72 74 53 49 | 54 78 00 00 00 00 00 00 |..PartSI|Tx......|
|00000560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000570| 00 00 a9 80 18 cf 00 00 | 00 00 00 00 01 7e 20 22 |........|.....~ "|
|00000580| 7b 57 6f 72 6b 73 68 65 | 65 74 7d 22 3b 20 09 20 |{Workshe|et}"; . |
|00000590| 45 63 68 6f 3b 20 45 63 | 68 6f 3b 20 09 20 42 75 |Echo; Ec|ho; . Bu|
|000005a0| 69 6c 64 50 72 6f 67 72 | 61 6d 20 22 7b 50 72 6f |ildProgr|am "{Pro|
|000005b0| 67 72 61 6d 7d 22 3b 20 | 09 20 45 6e 64 20 3e 3e |gram}"; |. End >>|
|000005c0| 20 22 7b 57 6f 72 6b 73 | 68 65 65 74 7d 22 20 b3 | "{Works|heet}" .|
|000005d0| b3 20 44 65 76 3a 53 74 | 64 4f 75 74 27 0d 41 64 |. Dev:St|dOut'.Ad|
|000005e0| 64 4d 65 6e 75 20 42 6c | 64 20 27 46 75 6c 6c 20 |dMenu Bl|d 'Full |
|000005f0| 42 75 69 6c 64 c9 27 20 | 27 42 65 67 69 6e 3b 20 |Build.' |'Begin; |
|00000600| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 24 00 57 |...H..Mo|naco.$.W|
|00000610| 01 24 01 b7 01 4e 00 57 | 01 4e 01 e6 00 00 00 00 |.$...N.W|.N......|
|00000620| 00 00 00 00 00 00 00 06 | 00 04 00 42 00 0a 00 b9 |........|...B....|
|00000630| 01 c9 00 69 00 26 00 e0 | 01 e5 a3 82 92 cb 00 00 |...i.&..|........|
|00000640| 00 00 00 00 00 00 00 00 | 00 00 01 00 00 00 01 00 |........|........|
|00000650| 00 00 01 4c 00 00 00 4c | 00 00 00 32 00 2d cc 74 |...L...L|...2.-.t|
|00000660| 07 b8 00 00 00 1c 00 32 | 00 00 4d 50 53 52 00 00 |.......2|..MPSR..|
|00000670| 00 0a 03 ed ff ff 00 00 | 00 00 00 2f 6e e8 00 00 |........|.../n...|
+--------+-------------------------+-------------------------+--------+--------+